Ext.define('IHC.controller.ihc.processos.IHC004FormController' , {
	extend : 'Ext.app.Controller',
	
	requires : [
		'IHC.model.AtividadeColaborador',
		'IHC.store.ihc.processos.IHC004AtividadeColaborador',
		'IHC.view.ihc.processos.IHC004FormWindow'
	],
	
	views : [
		'IHC.view.ihc.processos.IHC004FormWindow'
	],
	
	stores : [
		'IHC.store.ihc.processos.IHC004AtividadeColaborador'
	],
	
	refs : [{
		ref: 'hintToolbar',
		selector: '#ihc004-hint-toolbar'
	}, {
		ref: 'windowRef',
		selector: '#ihc004-window'
	}, {
		ref: 'formRef',
		selector: '#ihc004-form'
	}],
	
	mixins: [
		'InsoftExtUi.ux.mixins.controller.CrudFormMixin'
	],
	
	init: function() {
		var me = this;
		me.initController('IHC.store.ihc.processos.IHC004AtividadeColaborador');
	},
	
	actionIndex: function(mode, record) {
		var me = this,
			window = me.createWindow();
		
		mode = mode || 'I';
		
		if (mode === 'I') {
			record = Ext.create('IHC.model.AtividadeColaborador');
		}
		
		me.openWindow({ window: window, mode: mode, record: record });
	}
});
